﻿function view_onOpen() {
  buildUrl();
}

function a1_onclick() {
}
function buildUrl() {

 a1.href = "http://prepaidvergleich.de/tarifrechner?tarifrechner[mms]=0&tarifrechner[minutes]=" + minutes_edit.value + "&tarifrechner[sms]=" + sms_edit.value;
if(checkbox_tmobile.value == true)
{
a1.href = a1.href  + "&tarifrechner[netz][]=T-Mobile";
}
if(checkbox_vodafone.value == true)
{
a1.href = a1.href  + "&tarifrechner[netz][]=Vodafone";
}
if(checkbox_eplus.value == true)
{
a1.href = a1.href  +  "&tarifrechner[netz][]=E-Plus";
}
if(checkbox_o2.value == true)
{
a1.href = a1.href  +  "&tarifrechner[netz][]=O2";
}
a1.href = a1.href + "&tarifrechner[ausgaben]=" + (minutes_edit.value * 0.25 + sms_edit.value * 0.19);
}
